import sys
import decimal
bought = {0:'W',1:'T',2:'L'}
a = []
b = []
for i in range(3):
	l = []
	l = map(float,sys.stdin.readline().split())
	a.append(max(l))
	b.append(bought[l.index(max(l))])
# print a
# print b
ans = (a[0]*a[1]*a[2]*0.65-1)*2
ans = ans + 10 ** (- (2 + 1))


print b[0] + ' ' + b[1] + ' ' + b[2] + ' ' + str(round(ans,2))


